package cn.yeziji.forum.controller;

import cn.yeziji.forum.common.ForumResult;
import cn.yeziji.forum.dao.intf.ForumUserCommentDao;
import cn.yeziji.forum.dto.comment.ForumOperationCommentDTO;
import cn.yeziji.forum.utils.ForumResultUtils;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 用户操作评论控制器
 *
 * @author gzkemays
 * @since 2022/2/23 15:25
 */
@RestController
@RequestMapping("/userComment")
public class ForumUserCommentController {
  @Resource ForumUserCommentDao userCommentDao;

  @PostMapping("/good")
  public ForumResult toGood(@RequestBody ForumOperationCommentDTO dto) {
    return ForumResultUtils.ok(userCommentDao.commentToGood(dto));
  }
}
